<div class="user-list-container">
    <div class="row">
        <div class="col-sm-12">
            <div class="user-toolbar-container">
                <form class="form-inline" role="form">
                    <div class="form-group">
                        <div class="input-group">
                            <input #input class="form-control" placeholder="Search" (change)="searchUser(input)">
                            <div class="input-group-addon btn btn-primary active" (click)="resetSearch(input)">
                                <i class="fa fa-ban" aria-hidden="true"></i>
                            </div>
                        </div>
                    </div>
                    <button type="button" class="btn btn-success" routerLink="/user/adduser"><i class="fa fa-plus" aria-hidden="true"></i>Add User</button>
                </form>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <div class="table-responsive">
                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <th>Index</th>
                            <th>UserName</th>
                            <th>NickName</th>
                            <th>Operation</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr *ngFor="let user of users;let idx = index">
                            <td>{{idx+1}}</td>
                            <td>{{user.userName}}</td>
                            <td>{{user.nickName}}</td>
                            <td>
                                <a href="javascript:void(0);" (click)="delUser(user.userId)"><i class="fa fa-times" aria-hidden="true"></i></a>
                                <a href="javascript:void(0);" (click)="userDetail(user.userId)"><i class="fa fa-info-circle" aria-hidden="true"></i></a>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <pagination [totalItems]="bigTotalItems" [(ngModel)]="bigCurrentPage" [maxSize]="maxSize" class="pagination-sm" [boundaryLinks]="true" [rotate]="false" (numPages)="numPages = $event" (pageChanged)="pageChanged($event)"></pagination>
            </div>
        </div>
    </div>
</div>
